/*
day398 
2020.9.29 
*/ 
#include<iostream>
#include<map>
#include<vector>
using namespace std;

class Solution {
public:
    vector<int> masterMind(string solution, string guess) {
    	vector<int> res(2);
		map<char,int> sol,gue;
		for(int i=0;i<4;++i)
		{
			if(solution[i]==guess[i])
			{
				res[0]++;
			}
			else
			{
				sol[solution[i]]++;
				gue[guess[i]]++;
			}
		}
		
		for(auto &p : sol)
		{
			res[1]+=(min(p.second,gue[p.first]));
		}
		
		return res;
    }
};


int main()
{
	return 0;
}
